﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WorkStation.Common
{
    public class InUseStatus
    {

        [DisplayName("治具启用状态"), Category("启用与屏蔽"), Description("设定是否启用某个治具")]
        public bool[] TesterInUseStatus { get; set; }

        [DisplayName("Arm启用状态"), Category("启用与屏蔽"), Description("设定是否启用某个Arm")]
        public bool[] ArmInUseStatus { get; set; }

        //[DisplayName("机械手启用状态"), Category("运控"), Description("设定是否启用某个机械手")]
        //public bool[] RobotInUseStatus { get; set; }
        [DisplayName("治具模拟测试"), Category("测试选项"), Description("设定是否启用治具模拟测试")]
        public bool IsTesterSimulate { get; set; }
        [DisplayName("轨道模拟信号"), Category("启用与屏蔽"), Description("设定是否启用轨道模拟信号")]
        public bool IsConveyorSimulate { get; set; }
        [DisplayName("视觉不启用"), Category("启用与屏蔽"), Description("视觉不启用")]
        public bool IsVisionSimulate { get; set; }
        [DisplayName("是否强制OK"), Category("测试选项"), Description("设定是否是否强制OK")]
        public bool IsEnforceOK { get; set; }
        [DisplayName("治具开真空失败时可继续并判定为NG"), Category("测试选项"), Description("治具开真空失败时可继续并判定为NG")]
        public bool TesterVacNoCheck { get; set; }
        [DisplayName("是否屏蔽机械手1"), Category("启用与屏蔽"), Description("是否屏蔽机械手1")]
        public bool IsRobot1Disable { get; set; }
        [DisplayName("是否屏蔽机械手2"), Category("启用与屏蔽"), Description("是否屏蔽机械手2")]
        public bool IsRobot2Disable { get; set; }
        [DisplayName("是否启用扫码枪"), Category("启用与屏蔽"), Description("设定是否启用扫码枪")]
        public bool IsScannerInUse { get; set; }
        [DisplayName("是否扫码报警提示"), Category("启用与屏蔽"), Description("是否扫码报警提示")]
        public bool IsScannerWarnEnable { get; set; } = true;
        [DisplayName("是否MesCheckIn报警提示"), Category("启用与屏蔽"), Description("是否MesCheckIn报警提示")]
        public bool IsMesCheckInWarnEnable { get; set; } = true;
        [DisplayName("是否禁用前模组"), Category("启用与屏蔽"), Description("是否禁用前模组")]
        public bool IsFrontDisable { get; set; }
        [DisplayName("是否禁用后模组"), Category("启用与屏蔽"), Description("是否禁用后模组")]
        public bool IsBackDisable { get; set; }
        [DisplayName("是否启用压测模式"), Category("特殊模式"), Description("是否启用压测模式")]
        public bool IsCosmetic { get; set; }
        [DisplayName("单治具压测次数"), Category("特殊模式"), Description("单治具压测次数")]
        public int CosmeticCount { get; set; } = 3;
        [DisplayName("上料Boat补偿X"), Category("视觉补偿"), Description("上料Boat补偿X")]
        public double FeedTrayCompensationX { get; set; } = 0;
        [DisplayName("上料Boat补偿Y"), Category("视觉补偿"), Description("上料Boat补偿Y")]
        public double FeedTrayCompensationY { get; set; } = 0;
        [DisplayName("机械手2上料Boat补偿X"), Category("视觉补偿"), Description("机械手2上料Boat补偿X")]
        public double FeedTrayCompensationXRobot2 { get; set; } = 0;
        [DisplayName("机械手2上料Boat补偿Y"), Category("视觉补偿"), Description("机械手2上料Boat补偿Y")]
        public double FeedTrayCompensationYRobot2 { get; set; } = 0;
        [DisplayName("下料Boat补偿X"), Category("视觉补偿"), Description("下料Boat补偿X")]
        public double RecycleTrayCompensationX { get; set; } = 0;
        [DisplayName("下料Boat补偿Y"), Category("视觉补偿"), Description("下料Boat补偿Y")]
        public double RecycleTrayCompensationY { get; set; } = 0;
        [DisplayName("下料启用补偿"), Category("视觉补偿"), Description("下料启用补偿")]
        public bool RecycleTrayCompensationEnable { get; set; } = true;
        [DisplayName("机械手2下料Boat补偿X"), Category("视觉补偿"), Description("机械手2下料Boat补偿X")]
        public double RecycleTrayCompensationXRobot2 { get; set; } = 0;
        [DisplayName("机械手2下料Boat补偿Y"), Category("视觉补偿"), Description("机械手2下料Boat补偿Y")]
        public double RecycleTrayCompensationYRobot2 { get; set; } = 0;
        [DisplayName("机械手2下料启用补偿"), Category("视觉补偿"), Description("机械手2下料启用补偿")]
        public bool RecycleTrayCompensationEnableRobot2 { get; set; } = true;
        [DisplayName("默认视觉给满盘"), Category("视觉补偿"), Description("默认视觉给满盘")]
        public bool DefaultCCDIsFullEnable { get; set; } = false;




        [DisplayName("精定位到位后松开定位延时(机械手上层)"), Category("精定位"), Description("精定位到位后松开定位延时(机械手上层)")]
        public int ReleasePrecisionDelayInRobotUp { get; set; } = 500;
        [DisplayName("精定位到位前松开定位延时(机械手上层)"), Category("精定位"), Description("精定位到位前松开定位延时(机械手上层)")]
        public int ReleasePrecisionDelayBeforeInRobotUp { get; set; } = 500;

        [DisplayName("精定位到位后夹紧定位延时(机械手上层)"), Category("精定位"), Description("精定位到位后夹紧定位延时(机械手上层)")]
        public int ClampPrecisionDelayInRobotUp { get; set; } = 500;
        [DisplayName("精定位到位前夹紧定位延时(机械手上层)"), Category("精定位"), Description("精定位到位前夹紧定位延时(机械手上层)")]
        public int ClampPrecisionDelayBeforeInRobotUp { get; set; } = 500;

        [DisplayName("精定位到位后松开定位延时(机械手下层)"), Category("精定位"), Description("精定位到位后松开定位延时(机械手下层)")]
        public int ReleasePrecisionDelayInRobotDown { get; set; } = 500;
        [DisplayName("精定位到位前松开定位延时(机械手下层)"), Category("精定位"), Description("精定位到位前松开定位延时(机械手下层)")]
        public int ReleasePrecisionDelayBeforeInRobotDown { get; set; } = 500;

        [DisplayName("精定位到位后夹紧定位延时(机械手下层)"), Category("精定位"), Description("精定位到位后夹紧定位延时(机械手下层)")]
        public int ClampPrecisionDelayInRobotDown { get; set; } = 500;
        [DisplayName("精定位到位前夹紧定位延时(机械手下层)"), Category("精定位"), Description("精定位到位前夹紧定位延时(机械手下层)")]
        public int ClampPrecisionDelayBeforeInRobotDown { get; set; } = 500;


        [DisplayName("精定位到位后松开定位延时(Arm上层)"), Category("精定位"), Description("精定位到位后松开定位延时(Arm上层)")]
        public int ReleasePrecisionDelayInArmUp { get; set; } = 500;
        [DisplayName("精定位到位前松开定位延时(Arm上层)"), Category("精定位"), Description("精定位到位前松开定位延时(Arm上层)")]
        public int ReleasePrecisionDelayBeforeInArmUp { get; set; } = 500;

        [DisplayName("精定位到位后夹紧定位延时(Arm上层)"), Category("精定位"), Description("精定位到位后夹紧定位延时(Arm上层)")]
        public int ClampPrecisionDelayInArmUp { get; set; } = 500;
        [DisplayName("精定位到位前夹紧定位延时(Arm上层)"), Category("精定位"), Description("精定位到位前夹紧定位延时(Arm上层)")]
        public int ClampPrecisionDelayBeforeInArmUp { get; set; } = 500;

        [DisplayName("精定位到位后松开定位延时(Arm下层)"), Category("精定位"), Description("精定位到位后松开定位延时(Arm下层)")]
        public int ReleasePrecisionDelayInArmDown { get; set; } = 500;
        [DisplayName("精定位到位前松开定位延时(Arm下层)"), Category("精定位"), Description("精定位到位前松开定位延时(Arm下层)")]
        public int ReleasePrecisionDelayBeforeInArmDown { get; set; } = 500;

        [DisplayName("精定位到位后夹紧定位延时(Arm下层)"), Category("精定位"), Description("精定位到位后夹紧定位延时(Arm下层)")]
        public int ClampPrecisionDelayInArmDown { get; set; } = 500;
        [DisplayName("精定位到位前夹紧定位延时(Arm下层)"), Category("精定位"), Description("精定位到位前夹紧定位延时(Arm下层)")]
        public int ClampPrecisionDelayBeforeInArmDown { get; set; } = 500;


        [DisplayName("错位气缸伸出分离延时(ms)"), Category("精定位"), Description("错位气缸伸出分离延时(ms)")]
        public int CylinderSeparateOutDelay { get; set; } = 500;

        [DisplayName("测试治具放料Y相对位移(Arm1-1)"), Category("测试治具放料Y相对位移(上层)"), Description("测试治具放料Y相对位移(Arm1-1)")]
        public double TesterPutPUpYArm11 { get; set; } = 0;
        [DisplayName("测试治具放料Y相对位移(Arm1-2)"), Category("测试治具放料Y相对位移(上层)"), Description("测试治具放料Y相对位移(Arm1-2)")]
        public double TesterPutPUpYArm12 { get; set; } = 0;
        [DisplayName("测试治具放料Y相对位移(Arm1-3)"), Category("测试治具放料Y相对位移(上层)"), Description("测试治具放料Y相对位移(Arm1-3)")]
        public double TesterPutPUpYArm13 { get; set; } = 0;
        [DisplayName("测试治具放料Y相对位移(Arm2-1)"), Category("测试治具放料Y相对位移(上层)"), Description("测试治具放料Y相对位移(Arm2-1)")]
        public double TesterPutPUpYArm21 { get; set; } = 0;
        [DisplayName("测试治具放料Y相对位移(Arm2-2)"), Category("测试治具放料Y相对位移(上层)"), Description("测试治具放料Y相对位移(Arm2-2)")]
        public double TesterPutPUpYArm22 { get; set; } = 0;
        [DisplayName("测试治具放料Y相对位移(Arm2-3)"), Category("测试治具放料Y相对位移(上层)"), Description("测试治具放料Y相对位移(Arm2-3)")]
        public double TesterPutPUpYArm23 { get; set; } = 0;
        [DisplayName("测试治具放料Y相对位移(Arm3-1)"), Category("测试治具放料Y相对位移(上层)"), Description("测试治具放料Y相对位移(Arm3-1)")]
        public double TesterPutPUpYArm31 { get; set; } = 0;
        [DisplayName("测试治具放料Y相对位移(Arm3-2)"), Category("测试治具放料Y相对位移(上层)"), Description("测试治具放料Y相对位移(Arm3-2)")]
        public double TesterPutPUpYArm32 { get; set; } = 0;
        [DisplayName("测试治具放料Y相对位移(Arm3-3)"), Category("测试治具放料Y相对位移(上层)"), Description("测试治具放料Y相对位移(Arm3-3)")]
        public double TesterPutPUpYArm33 { get; set; } = 0;
        [DisplayName("测试治具放料Y相对位移(Arm4-1)"), Category("测试治具放料Y相对位移(上层)"), Description("测试治具放料Y相对位移(Arm4-1)")]
        public double TesterPutPUpYArm41 { get; set; } = 0;
        [DisplayName("测试治具放料Y相对位移(Arm4-2)"), Category("测试治具放料Y相对位移(上层)"), Description("测试治具放料Y相对位移(Arm4-2)")]
        public double TesterPutPUpYArm42 { get; set; } = 0;
        [DisplayName("测试治具放料Y相对位移(Arm4-3)"), Category("测试治具放料Y相对位移(上层)"), Description("测试治具放料Y相对位移(Arm4-3)")]
        public double TesterPutPUpYArm43 { get; set; } = 0;

        [DisplayName("测试治具放料Y相对位移(Arm1-1)"), Category("测试治具放料Y相对位移(下层)"), Description("测试治具放料Y相对位移(Arm1-1)")]
        public double TesterPutPDownYArm11 { get; set; } = 0;
        [DisplayName("测试治具放料Y相对位移(Arm1-2)"), Category("测试治具放料Y相对位移(下层)"), Description("测试治具放料Y相对位移(Arm1-2)")]
        public double TesterPutPDownYArm12 { get; set; } = 0;
        [DisplayName("测试治具放料Y相对位移(Arm1-3)"), Category("测试治具放料Y相对位移(下层)"), Description("测试治具放料Y相对位移(Arm1-3)")]
        public double TesterPutPDownYArm13 { get; set; } = 0;
        [DisplayName("测试治具放料Y相对位移(Arm2-1)"), Category("测试治具放料Y相对位移(下层)"), Description("测试治具放料Y相对位移(Arm2-1)")]
        public double TesterPutPDownYArm21 { get; set; } = 0;
        [DisplayName("测试治具放料Y相对位移(Arm2-2)"), Category("测试治具放料Y相对位移(下层)"), Description("测试治具放料Y相对位移(Arm2-2)")]
        public double TesterPutPDownYArm22 { get; set; } = 0;
        [DisplayName("测试治具放料Y相对位移(Arm2-3)"), Category("测试治具放料Y相对位移(下层)"), Description("测试治具放料Y相对位移(Arm2-3)")]
        public double TesterPutPDownYArm23 { get; set; } = 0;
        [DisplayName("测试治具放料Y相对位移(Arm3-1)"), Category("测试治具放料Y相对位移(下层)"), Description("测试治具放料Y相对位移(Arm3-1)")]
        public double TesterPutPDownYArm31 { get; set; } = 0;
        [DisplayName("测试治具放料Y相对位移(Arm3-2)"), Category("测试治具放料Y相对位移(下层)"), Description("测试治具放料Y相对位移(Arm3-2)")]
        public double TesterPutPDownYArm32 { get; set; } = 0;
        [DisplayName("测试治具放料Y相对位移(Arm3-3)"), Category("测试治具放料Y相对位移(下层)"), Description("测试治具放料Y相对位移(Arm3-3)")]
        public double TesterPutPDownYArm33 { get; set; } = 0;
        [DisplayName("测试治具放料Y相对位移(Arm4-1)"), Category("测试治具放料Y相对位移(下层)"), Description("测试治具放料Y相对位移(Arm4-1)")]
        public double TesterPutPDownYArm41 { get; set; } = 0;
        [DisplayName("测试治具放料Y相对位移(Arm4-2)"), Category("测试治具放料Y相对位移(下层)"), Description("测试治具放料Y相对位移(Arm4-2)")]
        public double TesterPutPDownYArm42 { get; set; } = 0;
        [DisplayName("测试治具放料Y相对位移(Arm4-3)"), Category("测试治具放料Y相对位移(下层)"), Description("测试治具放料Y相对位移(Arm4-3)")]
        public double TesterPutPDownYArm43 { get; set; } = 0;
        [DisplayName("扫码前延时(ms)"), Category("扫码"), Description("扫码前延时(ms)")]
        public int ScanDelay { get; set; } = 100;
        [DisplayName("扫码强制Pass"), Category("扫码"), Description("扫码强制Pass")]
        public bool IsScanPassEnable { get; set; } = false;
        [DisplayName("测试流道使能"), Category("测试"), Description("测试流道使能")]
        public bool IsTestTrackEnable { get; set; } = false;
        [DisplayName("单步模式使能"), Category("测试"), Description("单步模式使能")]
        public bool IsSingleRunMode { get; set; } = false;
        [DisplayName("速度(1-100)(机械手1)"), Category("机械手"), Description("速度(1-100)(机械手1)")]
        public int RobotSpeed1 { get; set; } = 40;
        [DisplayName("加速度(1-100)(机械手1)"), Category("机械手"), Description("加速度(1-100)(机械手1)")]
        public int RobotAcc1 { get; set; } = 40;
        [DisplayName("减速度(1-100)(机械手1)"), Category("机械手"), Description("减速度(1-100)(机械手1)")]
        public int RobotDec1 { get; set; } = 40;
        [DisplayName("速度(1-100)(机械手2)"), Category("机械手"), Description("速度(1-100)(机械手2)")]
        public int RobotSpeed2 { get; set; } = 40;
        [DisplayName("加速度(1-100)(机械手2)"), Category("机械手"), Description("加速度(1-100)(机械手2)")]
        public int RobotAcc2 { get; set; } = 40;
        [DisplayName("减速度(1-100)(机械手2)"), Category("机械手"), Description("减速度(1-100)(机械手2)")]
        public int RobotDec2 { get; set; } = 40;
        public InUseStatus()
        {
            TesterInUseStatus = new bool[12] {true, true, true,
                                              true, true, true,
                                              true, true, true,
                                              true, true, true};
            ArmInUseStatus = new bool[4] { true, true, true, true };
        }
    }
}
